﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace PSSMS.View.SysManage
{
    /// <summary>
    /// OperatorSM.xaml 的交互逻辑
    /// </summary>
    public partial class OperatorSM : UserControl
    {
        BLL.Operatorsm.OperatorsmClient myClient = new BLL.Operatorsm.OperatorsmClient();
        //实例化表格：接收筛选数据
        DataTable dtNew = new DataTable();
        public OperatorSM()
        {
            InitializeComponent();
        }

        private void Operadd(object sender, RoutedEventArgs e)
        {
            OperatorAdd opadd = new OperatorAdd();
            opadd.Show();
        }

        private void Operatorsm_Loaded(object sender, RoutedEventArgs e)
        {
            //查询操作员信息
            Operatorsm();
        }

        private void Operatorsm()
        {
            //调用服务查询方法
            dtNew = myClient.CheckOperatorsm().Tables[0];
            DgrdModel.ItemsSource = dtNew.DefaultView;
        }
    }
}
